package ch9.thread2;

public class TestThread3 {

	public static void main(String[] args) {

		PrintThread2 p = new PrintThread2("线程1");
		Thread t1 = new Thread(p);
		t1.setPriority(Thread.MAX_PRIORITY);

		Thread t2 = new Thread(new PrintThread2("线程2"));
		t2.setPriority(Thread.MIN_PRIORITY);

		Thread t3 = new Thread(new PrintThread2("线程3"));
		t3.setPriority(Thread.NORM_PRIORITY);
		t1.start();
		t2.start();
		t3.start();

		try {
			// 主线程睡5秒
			Thread.sleep(5000);
		} catch (InterruptedException e) {
			// TODO 自动生成的 catch 块
			e.printStackTrace();
		}
		System.out.println("主线程！！！！！！！！！！！！！！！！！");

	}

}
